package app

import (
	"gitee.com/war2001/NiuMaEasyGo/nm_core/auth"
	"gitee.com/war2001/NiuMaEasyGo/nm_core/cache"
	"gitee.com/war2001/NiuMaEasyGo/nm_core/config"
	"gitee.com/war2001/NiuMaEasyGo/nm_core/database"
	"gitee.com/war2001/NiuMaEasyGo/nm_core/logger"
	"gitee.com/war2001/NiuMaEasyGo/nm_core/middleware"
	"gitee.com/war2001/NiuMaEasyGo/nm_core/router"
	"gitee.com/war2001/NiuMaEasyGo/nm_core/security"
	"gitee.com/war2001/NiuMaEasyGo/nm_core/service"
	"gitee.com/war2001/NiuMaEasyGo/nm_core/shutdown"
	"gitee.com/war2001/NiuMaEasyGo/nm_core/storage"
	"gitee.com/war2001/NiuMaEasyGo/nm_core/tenant"
)

// App 应用管理器
type App struct {
	Config            *config.Config
	Logger            *logger.ZapLogger
	Database          *database.Database
	Redis             *cache.Redis
	Router            *router.Router
	Middleware        *middleware.Middleware
	Security          *security.Security
	Storage           *storage.Manager
	Service           *service.Service
	Shutdown          *shutdown.Manager
	PermissionManager *auth.PermissionManager
	MenuManager       *auth.MenuManager
	RoleManager       *auth.RoleManager
	DataScopeFilter   *auth.DataScopeFilter
	TenantManager     *tenant.TenantManager
	DataSourceManager *tenant.DataSourceManager
}

// New 创建应用实例
func New() *App {
	return &App{}
}

// TODO: 实现应用初始化流程
// TODO: 实现配置加载
// TODO: 实现日志系统初始化
// TODO: 实现数据库连接初始化
// TODO: 实现Redis缓存初始化
// TODO: 实现其他存储/服务初始化
// TODO: 实现中间件注册
// TODO: 实现路由注册
// TODO: 实现HTTP服务启动
// TODO: 实现信号监听设置
// TODO: 实现权限系统初始化
// TODO: 实现租户系统初始化
